<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <form action="test6.html" method="get" onsubmit="return check(this)">
    
        手机号码：<input type=text name="tel" size="18" value="" >
        <br>
        登录密码：<input type="password" name="password" size="19" value=""/>
        <input type=submit name="submit1" value="登陆">
    
    </form>
</body>
<script type="text/javascript">

    function check(form) {
        if (form.tel.value.trim()== '') {
            alert("请输入用户帐号!");
            form.tel.focus();
            return false;
        }
        if (form.password.value == '') {
            alert("请输入登录密码!");
            form.password.focus();
            return false;
        }
        return true;
    }

</script>
</html>
